import Common from '@/mixins/order/common.js';
const ExportDefault = {
    mixins: [Common],
    data() {
        
        return {
            
        };
    },
    mounted() {
      
      //出租方   &&   租用段落/设备
      this.formData["22746-100013698"].isshow = false;
      this.formData["22746-100013699"].isshow = false;

      //填报人
      
      this.formData["22756-100012377"].value = this.user.staffName;
      // this.init();

    },
    computed: {
      },
    methods: {

        init() {
            
            var dateTime = this.$util.dateFormat(
                new Date(),
                "yyyy-MM-dd"
            );
            this.formData["22756-100012440"].value = dateTime;
            //   this.formData["22756-100012611"].value = orderTaskIds.taskReqDate;
            //   this.formData["22746-141000044"].value = orderTaskIds.nodeName;
            // this.formData["22756-141000045"].value = orderTaskIds.linkTel;
         },


         //是否需租用第三方资源
    hideTheOtherPart() {
        if (1 == this.formData["22746-100012871"].value) {
          
          this.formData["22746-100013698"].isshow = true;
          this.formData["22746-100013699"].isshow = true;
        } else {
          
          this.formData["22746-100013698"].isshow = false;
          this.formData["22746-100013699"].isshow = false;
        }
      },


      MTU() {
        var that = this;
        
        if ('10803002' == this.formData["22746-141000168"].value) {
          let MTUnbr = "";

          this.$prompt('可支持MTU数值', '请输入', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            inputPattern: /^[1-9]\d*$/,
            inputErrorMessage: 'MTU数值格式不正确'
          }).then(({ value }) => {
            that.formData["22746-141000170"].value = value;
            that.formData["22746-141000168"].value = '10803002';
            // this.$message({
            //   type: 'success',
            //   //message: '可支持MTU数值aa: ' + value,
              
            // });
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '取消输入'
            });
          });

        } else {
          if ('10803001' == this.formData["22746-141000168"].value) {
            that.formData["22746-141000170"].value = "";
          }
        }
      }

      

       
       



    },
}

export default ExportDefault;